// Copyright (c) Lawrence Livermore National Security, LLC and other VisIt
// Project developers.  See the top-level LICENSE file for dates and other
// details.  No copyright assignment is required to contribute to VisIt.

#include <PyPickAttributes.h>
#include <ObserverToCallback.h>
#include <stdio.h>
#include <Py2and3Support.h>
#include <PyPickVarInfo.h>

// ****************************************************************************
// Module: PyPickAttributes
//
// Purpose:
//   This class contains attributes used for pick.
//
// Note:       Autogenerated by xml2python. Do not modify by hand!
//
// Programmer: xml2python
// Creation:   omitted
//
// ****************************************************************************

//
// This struct contains the Python type information and a PickAttributes.
//
struct PickAttributesObject
{
    PyObject_HEAD
    PickAttributes *data;
    bool        owns;
    PyObject   *parent;
};

//
// Internal prototypes
//
static PyObject *NewPickAttributes(int);
std::string
PyPickAttributes_ToString(const PickAttributes *atts, const char *prefix, const bool forLogging)
{
    std::string str;
    char tmpStr[1000];

    {   const stringVector &variables = atts->GetVariables();
        snprintf(tmpStr, 1000, "%svariables = (", prefix);
        str += tmpStr;
        for(size_t i = 0; i < variables.size(); ++i)
        {
            snprintf(tmpStr, 1000, "\"%s\"", variables[i].c_str());
            str += tmpStr;
            if(i < variables.size() - 1)
            {
                snprintf(tmpStr, 1000, ", ");
                str += tmpStr;
            }
        }
        snprintf(tmpStr, 1000, ")\n");
        str += tmpStr;
    }
    if(atts->GetShowIncidentElements())
        snprintf(tmpStr, 1000, "%sshowIncidentElements = 1\n", prefix);
    else
        snprintf(tmpStr, 1000, "%sshowIncidentElements = 0\n", prefix);
    str += tmpStr;
    if(atts->GetShowNodeId())
        snprintf(tmpStr, 1000, "%sshowNodeId = 1\n", prefix);
    else
        snprintf(tmpStr, 1000, "%sshowNodeId = 0\n", prefix);
    str += tmpStr;
    if(atts->GetShowNodeDomainLogicalCoords())
        snprintf(tmpStr, 1000, "%sshowNodeDomainLogicalCoords = 1\n", prefix);
    else
        snprintf(tmpStr, 1000, "%sshowNodeDomainLogicalCoords = 0\n", prefix);
    str += tmpStr;
    if(atts->GetShowNodeBlockLogicalCoords())
        snprintf(tmpStr, 1000, "%sshowNodeBlockLogicalCoords = 1\n", prefix);
    else
        snprintf(tmpStr, 1000, "%sshowNodeBlockLogicalCoords = 0\n", prefix);
    str += tmpStr;
    if(atts->GetShowNodePhysicalCoords())
        snprintf(tmpStr, 1000, "%sshowNodePhysicalCoords = 1\n", prefix);
    else
        snprintf(tmpStr, 1000, "%sshowNodePhysicalCoords = 0\n", prefix);
    str += tmpStr;
    if(atts->GetShowZoneId())
        snprintf(tmpStr, 1000, "%sshowZoneId = 1\n", prefix);
    else
        snprintf(tmpStr, 1000, "%sshowZoneId = 0\n", prefix);
    str += tmpStr;
    if(atts->GetShowZoneDomainLogicalCoords())
        snprintf(tmpStr, 1000, "%sshowZoneDomainLogicalCoords = 1\n", prefix);
    else
        snprintf(tmpStr, 1000, "%sshowZoneDomainLogicalCoords = 0\n", prefix);
    str += tmpStr;
    if(atts->GetShowZoneBlockLogicalCoords())
        snprintf(tmpStr, 1000, "%sshowZoneBlockLogicalCoords = 1\n", prefix);
    else
        snprintf(tmpStr, 1000, "%sshowZoneBlockLogicalCoords = 0\n", prefix);
    str += tmpStr;
    if(atts->GetDoTimeCurve())
        snprintf(tmpStr, 1000, "%sdoTimeCurve = 1\n", prefix);
    else
        snprintf(tmpStr, 1000, "%sdoTimeCurve = 0\n", prefix);
    str += tmpStr;
    if(atts->GetConciseOutput())
        snprintf(tmpStr, 1000, "%sconciseOutput = 1\n", prefix);
    else
        snprintf(tmpStr, 1000, "%sconciseOutput = 0\n", prefix);
    str += tmpStr;
    if(atts->GetShowTimeStep())
        snprintf(tmpStr, 1000, "%sshowTimeStep = 1\n", prefix);
    else
        snprintf(tmpStr, 1000, "%sshowTimeStep = 0\n", prefix);
    str += tmpStr;
    if(atts->GetShowMeshName())
        snprintf(tmpStr, 1000, "%sshowMeshName = 1\n", prefix);
    else
        snprintf(tmpStr, 1000, "%sshowMeshName = 0\n", prefix);
    str += tmpStr;
    snprintf(tmpStr, 1000, "%sblockPieceName = \"%s\"\n", prefix, atts->GetBlockPieceName().c_str());
    str += tmpStr;
    snprintf(tmpStr, 1000, "%sgroupPieceName = \"%s\"\n", prefix, atts->GetGroupPieceName().c_str());
    str += tmpStr;
    if(atts->GetUseLabelAsPickLetter())
        snprintf(tmpStr, 1000, "%suseLabelAsPickLetter = 1\n", prefix);
    else
        snprintf(tmpStr, 1000, "%suseLabelAsPickLetter = 0\n", prefix);
    str += tmpStr;
    if(atts->GetShowGlobalIds())
        snprintf(tmpStr, 1000, "%sshowGlobalIds = 1\n", prefix);
    else
        snprintf(tmpStr, 1000, "%sshowGlobalIds = 0\n", prefix);
    str += tmpStr;
    if(atts->GetShowPickLetter())
        snprintf(tmpStr, 1000, "%sshowPickLetter = 1\n", prefix);
    else
        snprintf(tmpStr, 1000, "%sshowPickLetter = 0\n", prefix);
    str += tmpStr;
    snprintf(tmpStr, 1000, "%selementLabel = \"%s\"\n", prefix, atts->GetElementLabel().c_str());
    str += tmpStr;
    if(atts->GetReusePickLetter())
        snprintf(tmpStr, 1000, "%sreusePickLetter = 1\n", prefix);
    else
        snprintf(tmpStr, 1000, "%sreusePickLetter = 0\n", prefix);
    str += tmpStr;
    if(atts->GetShowPickHighlight())
        snprintf(tmpStr, 1000, "%sshowPickHighlight = 1\n", prefix);
    else
        snprintf(tmpStr, 1000, "%sshowPickHighlight = 0\n", prefix);
    str += tmpStr;
    if(atts->GetNotifyEnabled())
        snprintf(tmpStr, 1000, "%snotifyEnabled = 1\n", prefix);
    else
        snprintf(tmpStr, 1000, "%snotifyEnabled = 0\n", prefix);
    str += tmpStr;
    const char *meshCoordType_names = "XY, RZ, ZR";
    switch (atts->GetMeshCoordType())
    {
      case PickAttributes::XY:
          snprintf(tmpStr, 1000, "%smeshCoordType = %sXY  # %s\n", prefix, prefix, meshCoordType_names);
          str += tmpStr;
          break;
      case PickAttributes::RZ:
          snprintf(tmpStr, 1000, "%smeshCoordType = %sRZ  # %s\n", prefix, prefix, meshCoordType_names);
          str += tmpStr;
          break;
      case PickAttributes::ZR:
          snprintf(tmpStr, 1000, "%smeshCoordType = %sZR  # %s\n", prefix, prefix, meshCoordType_names);
          str += tmpStr;
          break;
      default:
          break;
    }

    if(atts->GetCreateSpreadsheet())
        snprintf(tmpStr, 1000, "%screateSpreadsheet = 1\n", prefix);
    else
        snprintf(tmpStr, 1000, "%screateSpreadsheet = 0\n", prefix);
    str += tmpStr;
    snprintf(tmpStr, 1000, "%sfloatFormat = \"%s\"\n", prefix, atts->GetFloatFormat().c_str());
    str += tmpStr;
    if(atts->GetTimePreserveCoord())
        snprintf(tmpStr, 1000, "%stimePreserveCoord = 1\n", prefix);
    else
        snprintf(tmpStr, 1000, "%stimePreserveCoord = 0\n", prefix);
    str += tmpStr;
    const char *timeCurveType_names = "Single_Y_Axis, Multiple_Y_Axes";
    switch (atts->GetTimeCurveType())
    {
      case PickAttributes::Single_Y_Axis:
          snprintf(tmpStr, 1000, "%stimeCurveType = %sSingle_Y_Axis  # %s\n", prefix, prefix, timeCurveType_names);
          str += tmpStr;
          break;
      case PickAttributes::Multiple_Y_Axes:
          snprintf(tmpStr, 1000, "%stimeCurveType = %sMultiple_Y_Axes  # %s\n", prefix, prefix, timeCurveType_names);
          str += tmpStr;
          break;
      default:
          break;
    }

    {   const int *pickHighlightColor = atts->GetPickHighlightColor();
        snprintf(tmpStr, 1000, "%spickHighlightColor = (", prefix);
        str += tmpStr;
        for(int i = 0; i < 3; ++i)
        {
            snprintf(tmpStr, 1000, "%d", pickHighlightColor[i]);
            str += tmpStr;
            if(i < 2)
            {
                snprintf(tmpStr, 1000, ", ");
                str += tmpStr;
            }
        }
        snprintf(tmpStr, 1000, ")\n");
        str += tmpStr;
    }
    snprintf(tmpStr, 1000, "%sremovedPicks = \"%s\"\n", prefix, atts->GetRemovedPicks().c_str());
    str += tmpStr;
    if(atts->GetSwivelFocusToPick())
        snprintf(tmpStr, 1000, "%sswivelFocusToPick = 1\n", prefix);
    else
        snprintf(tmpStr, 1000, "%sswivelFocusToPick = 0\n", prefix);
    str += tmpStr;
    if(atts->GetOverridePickLabel())
        snprintf(tmpStr, 1000, "%soverridePickLabel = 1\n", prefix);
    else
        snprintf(tmpStr, 1000, "%soverridePickLabel = 0\n", prefix);
    str += tmpStr;
    snprintf(tmpStr, 1000, "%sforcedPickLabel = \"%s\"\n", prefix, atts->GetForcedPickLabel().c_str());
    str += tmpStr;
    if(atts->GetRemoveLabelTwins())
        snprintf(tmpStr, 1000, "%sremoveLabelTwins = 1\n", prefix);
    else
        snprintf(tmpStr, 1000, "%sremoveLabelTwins = 0\n", prefix);
    str += tmpStr;
    return str;
}

static PyObject *
PickAttributes_Notify(PyObject *self, PyObject *args)
{
    PickAttributesObject *obj = (PickAttributesObject *)self;
    obj->data->Notify();
    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
PickAttributes_SetVariables(PyObject *self, PyObject *args)
{
    PickAttributesObject *obj = (PickAttributesObject *)self;

    stringVector vec;

    if (PyUnicode_Check(args))
    {
        char const *val = PyUnicode_AsUTF8(args);
        std::string cval = std::string(val);
        if (val == 0 && PyErr_Occurred())
        {
            PyErr_Clear();
            return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ string");
        }
        vec.resize(1);
        vec[0] = cval;
    }
    else if (PySequence_Check(args))
    {
        vec.resize(PySequence_Size(args));
        for (Py_ssize_t i = 0; i < PySequence_Size(args); i++)
        {
            PyObject *item = PySequence_GetItem(args, i);

            if (!PyUnicode_Check(item))
            {
                Py_DECREF(item);
                return PyErr_Format(PyExc_TypeError, "arg %d is not a unicode string", (int) i);
            }

            char const *val = PyUnicode_AsUTF8(item);
            std::string cval = std::string(val);

            if (val == 0 && PyErr_Occurred())
            {
                Py_DECREF(item);
                PyErr_Clear();
                return PyErr_Format(PyExc_TypeError, "arg %d not interpretable as C++ string", (int) i);
            }
            Py_DECREF(item);

            vec[i] = cval;
        }
    }
    else
        return PyErr_Format(PyExc_TypeError, "arg(s) must be one or more string(s)");

    obj->data->GetVariables() = vec;
    // Mark the variables in the object as modified.
    obj->data->SelectVariables();

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
PickAttributes_GetVariables(PyObject *self, PyObject *args)
{
    PickAttributesObject *obj = (PickAttributesObject *)self;
    // Allocate a tuple the with enough entries to hold the variables.
    const stringVector &variables = obj->data->GetVariables();
    PyObject *retval = PyTuple_New(variables.size());
    for(size_t i = 0; i < variables.size(); ++i)
        PyTuple_SET_ITEM(retval, i, PyString_FromString(variables[i].c_str()));
    return retval;
}

/*static*/ PyObject *
PickAttributes_SetShowIncidentElements(PyObject *self, PyObject *args)
{
    PickAttributesObject *obj = (PickAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    long val = PyLong_AsLong(args);
    bool cval = bool(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ bool");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(long(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ bool");
    }

    Py_XDECREF(packaged_args);

    // Set the showIncidentElements in the object.
    obj->data->SetShowIncidentElements(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
PickAttributes_GetShowIncidentElements(PyObject *self, PyObject *args)
{
    PickAttributesObject *obj = (PickAttributesObject *)self;
    PyObject *retval = PyInt_FromLong(obj->data->GetShowIncidentElements()?1L:0L);
    return retval;
}

/*static*/ PyObject *
PickAttributes_SetShowNodeId(PyObject *self, PyObject *args)
{
    PickAttributesObject *obj = (PickAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    long val = PyLong_AsLong(args);
    bool cval = bool(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ bool");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(long(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ bool");
    }

    Py_XDECREF(packaged_args);

    // Set the showNodeId in the object.
    obj->data->SetShowNodeId(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
PickAttributes_GetShowNodeId(PyObject *self, PyObject *args)
{
    PickAttributesObject *obj = (PickAttributesObject *)self;
    PyObject *retval = PyInt_FromLong(obj->data->GetShowNodeId()?1L:0L);
    return retval;
}

/*static*/ PyObject *
PickAttributes_SetShowNodeDomainLogicalCoords(PyObject *self, PyObject *args)
{
    PickAttributesObject *obj = (PickAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    long val = PyLong_AsLong(args);
    bool cval = bool(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ bool");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(long(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ bool");
    }

    Py_XDECREF(packaged_args);

    // Set the showNodeDomainLogicalCoords in the object.
    obj->data->SetShowNodeDomainLogicalCoords(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
PickAttributes_GetShowNodeDomainLogicalCoords(PyObject *self, PyObject *args)
{
    PickAttributesObject *obj = (PickAttributesObject *)self;
    PyObject *retval = PyInt_FromLong(obj->data->GetShowNodeDomainLogicalCoords()?1L:0L);
    return retval;
}

/*static*/ PyObject *
PickAttributes_SetShowNodeBlockLogicalCoords(PyObject *self, PyObject *args)
{
    PickAttributesObject *obj = (PickAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    long val = PyLong_AsLong(args);
    bool cval = bool(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ bool");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(long(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ bool");
    }

    Py_XDECREF(packaged_args);

    // Set the showNodeBlockLogicalCoords in the object.
    obj->data->SetShowNodeBlockLogicalCoords(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
PickAttributes_GetShowNodeBlockLogicalCoords(PyObject *self, PyObject *args)
{
    PickAttributesObject *obj = (PickAttributesObject *)self;
    PyObject *retval = PyInt_FromLong(obj->data->GetShowNodeBlockLogicalCoords()?1L:0L);
    return retval;
}

/*static*/ PyObject *
PickAttributes_SetShowNodePhysicalCoords(PyObject *self, PyObject *args)
{
    PickAttributesObject *obj = (PickAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    long val = PyLong_AsLong(args);
    bool cval = bool(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ bool");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(long(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ bool");
    }

    Py_XDECREF(packaged_args);

    // Set the showNodePhysicalCoords in the object.
    obj->data->SetShowNodePhysicalCoords(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
PickAttributes_GetShowNodePhysicalCoords(PyObject *self, PyObject *args)
{
    PickAttributesObject *obj = (PickAttributesObject *)self;
    PyObject *retval = PyInt_FromLong(obj->data->GetShowNodePhysicalCoords()?1L:0L);
    return retval;
}

/*static*/ PyObject *
PickAttributes_SetShowZoneId(PyObject *self, PyObject *args)
{
    PickAttributesObject *obj = (PickAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    long val = PyLong_AsLong(args);
    bool cval = bool(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ bool");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(long(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ bool");
    }

    Py_XDECREF(packaged_args);

    // Set the showZoneId in the object.
    obj->data->SetShowZoneId(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
PickAttributes_GetShowZoneId(PyObject *self, PyObject *args)
{
    PickAttributesObject *obj = (PickAttributesObject *)self;
    PyObject *retval = PyInt_FromLong(obj->data->GetShowZoneId()?1L:0L);
    return retval;
}

/*static*/ PyObject *
PickAttributes_SetShowZoneDomainLogicalCoords(PyObject *self, PyObject *args)
{
    PickAttributesObject *obj = (PickAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    long val = PyLong_AsLong(args);
    bool cval = bool(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ bool");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(long(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ bool");
    }

    Py_XDECREF(packaged_args);

    // Set the showZoneDomainLogicalCoords in the object.
    obj->data->SetShowZoneDomainLogicalCoords(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
PickAttributes_GetShowZoneDomainLogicalCoords(PyObject *self, PyObject *args)
{
    PickAttributesObject *obj = (PickAttributesObject *)self;
    PyObject *retval = PyInt_FromLong(obj->data->GetShowZoneDomainLogicalCoords()?1L:0L);
    return retval;
}

/*static*/ PyObject *
PickAttributes_SetShowZoneBlockLogicalCoords(PyObject *self, PyObject *args)
{
    PickAttributesObject *obj = (PickAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    long val = PyLong_AsLong(args);
    bool cval = bool(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ bool");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(long(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ bool");
    }

    Py_XDECREF(packaged_args);

    // Set the showZoneBlockLogicalCoords in the object.
    obj->data->SetShowZoneBlockLogicalCoords(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
PickAttributes_GetShowZoneBlockLogicalCoords(PyObject *self, PyObject *args)
{
    PickAttributesObject *obj = (PickAttributesObject *)self;
    PyObject *retval = PyInt_FromLong(obj->data->GetShowZoneBlockLogicalCoords()?1L:0L);
    return retval;
}

/*static*/ PyObject *
PickAttributes_SetDoTimeCurve(PyObject *self, PyObject *args)
{
    PickAttributesObject *obj = (PickAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    long val = PyLong_AsLong(args);
    bool cval = bool(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ bool");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(long(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ bool");
    }

    Py_XDECREF(packaged_args);

    // Set the doTimeCurve in the object.
    obj->data->SetDoTimeCurve(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
PickAttributes_GetDoTimeCurve(PyObject *self, PyObject *args)
{
    PickAttributesObject *obj = (PickAttributesObject *)self;
    PyObject *retval = PyInt_FromLong(obj->data->GetDoTimeCurve()?1L:0L);
    return retval;
}

/*static*/ PyObject *
PickAttributes_SetConciseOutput(PyObject *self, PyObject *args)
{
    PickAttributesObject *obj = (PickAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    long val = PyLong_AsLong(args);
    bool cval = bool(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ bool");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(long(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ bool");
    }

    Py_XDECREF(packaged_args);

    // Set the conciseOutput in the object.
    obj->data->SetConciseOutput(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
PickAttributes_GetConciseOutput(PyObject *self, PyObject *args)
{
    PickAttributesObject *obj = (PickAttributesObject *)self;
    PyObject *retval = PyInt_FromLong(obj->data->GetConciseOutput()?1L:0L);
    return retval;
}

/*static*/ PyObject *
PickAttributes_SetShowTimeStep(PyObject *self, PyObject *args)
{
    PickAttributesObject *obj = (PickAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    long val = PyLong_AsLong(args);
    bool cval = bool(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ bool");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(long(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ bool");
    }

    Py_XDECREF(packaged_args);

    // Set the showTimeStep in the object.
    obj->data->SetShowTimeStep(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
PickAttributes_GetShowTimeStep(PyObject *self, PyObject *args)
{
    PickAttributesObject *obj = (PickAttributesObject *)self;
    PyObject *retval = PyInt_FromLong(obj->data->GetShowTimeStep()?1L:0L);
    return retval;
}

/*static*/ PyObject *
PickAttributes_SetShowMeshName(PyObject *self, PyObject *args)
{
    PickAttributesObject *obj = (PickAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    long val = PyLong_AsLong(args);
    bool cval = bool(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ bool");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(long(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ bool");
    }

    Py_XDECREF(packaged_args);

    // Set the showMeshName in the object.
    obj->data->SetShowMeshName(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
PickAttributes_GetShowMeshName(PyObject *self, PyObject *args)
{
    PickAttributesObject *obj = (PickAttributesObject *)self;
    PyObject *retval = PyInt_FromLong(obj->data->GetShowMeshName()?1L:0L);
    return retval;
}

/*static*/ PyObject *
PickAttributes_SetBlockPieceName(PyObject *self, PyObject *args)
{
    PickAttributesObject *obj = (PickAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged as first member of a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyUnicode_Check(packaged_args))
            args = packaged_args;
    }

    if (!PyUnicode_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a unicode string");
    }

    char const *val = PyUnicode_AsUTF8(args);
    std::string cval = std::string(val);

    if (val == 0 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as utf8 string");
    }

    Py_XDECREF(packaged_args);

    // Set the blockPieceName in the object.
    obj->data->SetBlockPieceName(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
PickAttributes_GetBlockPieceName(PyObject *self, PyObject *args)
{
    PickAttributesObject *obj = (PickAttributesObject *)self;
    PyObject *retval = PyString_FromString(obj->data->GetBlockPieceName().c_str());
    return retval;
}

/*static*/ PyObject *
PickAttributes_SetGroupPieceName(PyObject *self, PyObject *args)
{
    PickAttributesObject *obj = (PickAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged as first member of a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyUnicode_Check(packaged_args))
            args = packaged_args;
    }

    if (!PyUnicode_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a unicode string");
    }

    char const *val = PyUnicode_AsUTF8(args);
    std::string cval = std::string(val);

    if (val == 0 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as utf8 string");
    }

    Py_XDECREF(packaged_args);

    // Set the groupPieceName in the object.
    obj->data->SetGroupPieceName(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
PickAttributes_GetGroupPieceName(PyObject *self, PyObject *args)
{
    PickAttributesObject *obj = (PickAttributesObject *)self;
    PyObject *retval = PyString_FromString(obj->data->GetGroupPieceName().c_str());
    return retval;
}

/*static*/ PyObject *
PickAttributes_SetUseLabelAsPickLetter(PyObject *self, PyObject *args)
{
    PickAttributesObject *obj = (PickAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    long val = PyLong_AsLong(args);
    bool cval = bool(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ bool");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(long(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ bool");
    }

    Py_XDECREF(packaged_args);

    // Set the useLabelAsPickLetter in the object.
    obj->data->SetUseLabelAsPickLetter(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
PickAttributes_GetUseLabelAsPickLetter(PyObject *self, PyObject *args)
{
    PickAttributesObject *obj = (PickAttributesObject *)self;
    PyObject *retval = PyInt_FromLong(obj->data->GetUseLabelAsPickLetter()?1L:0L);
    return retval;
}

/*static*/ PyObject *
PickAttributes_SetShowGlobalIds(PyObject *self, PyObject *args)
{
    PickAttributesObject *obj = (PickAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    long val = PyLong_AsLong(args);
    bool cval = bool(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ bool");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(long(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ bool");
    }

    Py_XDECREF(packaged_args);

    // Set the showGlobalIds in the object.
    obj->data->SetShowGlobalIds(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
PickAttributes_GetShowGlobalIds(PyObject *self, PyObject *args)
{
    PickAttributesObject *obj = (PickAttributesObject *)self;
    PyObject *retval = PyInt_FromLong(obj->data->GetShowGlobalIds()?1L:0L);
    return retval;
}

/*static*/ PyObject *
PickAttributes_SetShowPickLetter(PyObject *self, PyObject *args)
{
    PickAttributesObject *obj = (PickAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    long val = PyLong_AsLong(args);
    bool cval = bool(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ bool");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(long(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ bool");
    }

    Py_XDECREF(packaged_args);

    // Set the showPickLetter in the object.
    obj->data->SetShowPickLetter(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
PickAttributes_GetShowPickLetter(PyObject *self, PyObject *args)
{
    PickAttributesObject *obj = (PickAttributesObject *)self;
    PyObject *retval = PyInt_FromLong(obj->data->GetShowPickLetter()?1L:0L);
    return retval;
}

/*static*/ PyObject *
PickAttributes_SetElementLabel(PyObject *self, PyObject *args)
{
    PickAttributesObject *obj = (PickAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged as first member of a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyUnicode_Check(packaged_args))
            args = packaged_args;
    }

    if (!PyUnicode_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a unicode string");
    }

    char const *val = PyUnicode_AsUTF8(args);
    std::string cval = std::string(val);

    if (val == 0 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as utf8 string");
    }

    Py_XDECREF(packaged_args);

    // Set the elementLabel in the object.
    obj->data->SetElementLabel(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
PickAttributes_GetElementLabel(PyObject *self, PyObject *args)
{
    PickAttributesObject *obj = (PickAttributesObject *)self;
    PyObject *retval = PyString_FromString(obj->data->GetElementLabel().c_str());
    return retval;
}

/*static*/ PyObject *
PickAttributes_SetReusePickLetter(PyObject *self, PyObject *args)
{
    PickAttributesObject *obj = (PickAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    long val = PyLong_AsLong(args);
    bool cval = bool(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ bool");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(long(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ bool");
    }

    Py_XDECREF(packaged_args);

    // Set the reusePickLetter in the object.
    obj->data->SetReusePickLetter(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
PickAttributes_GetReusePickLetter(PyObject *self, PyObject *args)
{
    PickAttributesObject *obj = (PickAttributesObject *)self;
    PyObject *retval = PyInt_FromLong(obj->data->GetReusePickLetter()?1L:0L);
    return retval;
}

/*static*/ PyObject *
PickAttributes_SetShowPickHighlight(PyObject *self, PyObject *args)
{
    PickAttributesObject *obj = (PickAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    long val = PyLong_AsLong(args);
    bool cval = bool(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ bool");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(long(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ bool");
    }

    Py_XDECREF(packaged_args);

    // Set the showPickHighlight in the object.
    obj->data->SetShowPickHighlight(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
PickAttributes_GetShowPickHighlight(PyObject *self, PyObject *args)
{
    PickAttributesObject *obj = (PickAttributesObject *)self;
    PyObject *retval = PyInt_FromLong(obj->data->GetShowPickHighlight()?1L:0L);
    return retval;
}

/*static*/ PyObject *
PickAttributes_SetNotifyEnabled(PyObject *self, PyObject *args)
{
    PickAttributesObject *obj = (PickAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    long val = PyLong_AsLong(args);
    bool cval = bool(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ bool");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(long(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ bool");
    }

    Py_XDECREF(packaged_args);

    // Set the notifyEnabled in the object.
    obj->data->SetNotifyEnabled(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
PickAttributes_GetNotifyEnabled(PyObject *self, PyObject *args)
{
    PickAttributesObject *obj = (PickAttributesObject *)self;
    PyObject *retval = PyInt_FromLong(obj->data->GetNotifyEnabled()?1L:0L);
    return retval;
}

/*static*/ PyObject *
PickAttributes_SetMeshCoordType(PyObject *self, PyObject *args)
{
    PickAttributesObject *obj = (PickAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    long val = PyLong_AsLong(args);
    int cval = int(val);

    if ((val == -1 && PyErr_Occurred()) || long(cval) != val)
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ int");
    }

    if (cval < 0 || cval >= 3)
    {
        std::stringstream ss;
        ss << "An invalid meshCoordType value was given." << std::endl;
        ss << "Valid values are in the range [0,2]." << std::endl;
        ss << "You can also use the following symbolic names:";
        ss << " XY";
        ss << ", RZ";
        ss << ", ZR";
        return PyErr_Format(PyExc_ValueError, ss.str().c_str());
    }

    Py_XDECREF(packaged_args);

    // Set the meshCoordType in the object.
    obj->data->SetMeshCoordType(PickAttributes::CoordinateType(cval));

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
PickAttributes_GetMeshCoordType(PyObject *self, PyObject *args)
{
    PickAttributesObject *obj = (PickAttributesObject *)self;
    PyObject *retval = PyInt_FromLong(long(obj->data->GetMeshCoordType()));
    return retval;
}

/*static*/ PyObject *
PickAttributes_SetCreateSpreadsheet(PyObject *self, PyObject *args)
{
    PickAttributesObject *obj = (PickAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    long val = PyLong_AsLong(args);
    bool cval = bool(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ bool");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(long(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ bool");
    }

    Py_XDECREF(packaged_args);

    // Set the createSpreadsheet in the object.
    obj->data->SetCreateSpreadsheet(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
PickAttributes_GetCreateSpreadsheet(PyObject *self, PyObject *args)
{
    PickAttributesObject *obj = (PickAttributesObject *)self;
    PyObject *retval = PyInt_FromLong(obj->data->GetCreateSpreadsheet()?1L:0L);
    return retval;
}

/*static*/ PyObject *
PickAttributes_SetFloatFormat(PyObject *self, PyObject *args)
{
    PickAttributesObject *obj = (PickAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged as first member of a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyUnicode_Check(packaged_args))
            args = packaged_args;
    }

    if (!PyUnicode_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a unicode string");
    }

    char const *val = PyUnicode_AsUTF8(args);
    std::string cval = std::string(val);

    if (val == 0 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as utf8 string");
    }

    Py_XDECREF(packaged_args);

    // Set the floatFormat in the object.
    obj->data->SetFloatFormat(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
PickAttributes_GetFloatFormat(PyObject *self, PyObject *args)
{
    PickAttributesObject *obj = (PickAttributesObject *)self;
    PyObject *retval = PyString_FromString(obj->data->GetFloatFormat().c_str());
    return retval;
}

/*static*/ PyObject *
PickAttributes_SetTimePreserveCoord(PyObject *self, PyObject *args)
{
    PickAttributesObject *obj = (PickAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    long val = PyLong_AsLong(args);
    bool cval = bool(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ bool");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(long(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ bool");
    }

    Py_XDECREF(packaged_args);

    // Set the timePreserveCoord in the object.
    obj->data->SetTimePreserveCoord(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
PickAttributes_GetTimePreserveCoord(PyObject *self, PyObject *args)
{
    PickAttributesObject *obj = (PickAttributesObject *)self;
    PyObject *retval = PyInt_FromLong(obj->data->GetTimePreserveCoord()?1L:0L);
    return retval;
}

/*static*/ PyObject *
PickAttributes_SetTimeCurveType(PyObject *self, PyObject *args)
{
    PickAttributesObject *obj = (PickAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    long val = PyLong_AsLong(args);
    int cval = int(val);

    if ((val == -1 && PyErr_Occurred()) || long(cval) != val)
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ int");
    }

    if (cval < 0 || cval >= 2)
    {
        std::stringstream ss;
        ss << "An invalid timeCurveType value was given." << std::endl;
        ss << "Valid values are in the range [0,1]." << std::endl;
        ss << "You can also use the following symbolic names:";
        ss << " Single_Y_Axis";
        ss << ", Multiple_Y_Axes";
        return PyErr_Format(PyExc_ValueError, ss.str().c_str());
    }

    Py_XDECREF(packaged_args);

    // Set the timeCurveType in the object.
    obj->data->SetTimeCurveType(PickAttributes::TimeCurveType(cval));

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
PickAttributes_GetTimeCurveType(PyObject *self, PyObject *args)
{
    PickAttributesObject *obj = (PickAttributesObject *)self;
    PyObject *retval = PyInt_FromLong(long(obj->data->GetTimeCurveType()));
    return retval;
}

/*static*/ PyObject *
PickAttributes_SetPickHighlightColor(PyObject *self, PyObject *args)
{
    PickAttributesObject *obj = (PickAttributesObject *)self;

    PyObject *packaged_args = 0;
    int *vals = obj->data->GetPickHighlightColor();

    if (!PySequence_Check(args) || PyUnicode_Check(args))
        return PyErr_Format(PyExc_TypeError, "Expecting a sequence of numeric args");

    // break open args seq. if we think it matches this API's needs
    if (PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PySequence_Check(packaged_args) && !PyUnicode_Check(packaged_args) &&
            PySequence_Size(packaged_args) == 3)
            args = packaged_args;
    }

    if (PySequence_Size(args) != 3)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "Expecting 3 numeric args");
    }

    for (Py_ssize_t i = 0; i < PySequence_Size(args); i++)
    {
        PyObject *item = PySequence_GetItem(args, i);

        if (!PyNumber_Check(item))
        {
            Py_DECREF(item);
            Py_XDECREF(packaged_args);
            return PyErr_Format(PyExc_TypeError, "arg %d is not a number type", (int) i);
        }

        long val = PyLong_AsLong(item);
        int cval = int(val);

        if (val == -1 && PyErr_Occurred())
        {
            Py_XDECREF(packaged_args);
            Py_DECREF(item);
            PyErr_Clear();
            return PyErr_Format(PyExc_TypeError, "arg %d not interpretable as C++ int", (int) i);
        }
        if (fabs(double(val))>1.5E-7 && fabs((double(long(cval))-double(val))/double(val))>1.5E-7)
        {
            Py_XDECREF(packaged_args);
            Py_DECREF(item);
            return PyErr_Format(PyExc_ValueError, "arg %d not interpretable as C++ int", (int) i);
        }
        Py_DECREF(item);

        vals[i] = cval;
    }

    Py_XDECREF(packaged_args);

    // Mark the pickHighlightColor in the object as modified.
    obj->data->SelectPickHighlightColor();

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
PickAttributes_GetPickHighlightColor(PyObject *self, PyObject *args)
{
    PickAttributesObject *obj = (PickAttributesObject *)self;
    // Allocate a tuple the with enough entries to hold the pickHighlightColor.
    PyObject *retval = PyTuple_New(3);
    const int *pickHighlightColor = obj->data->GetPickHighlightColor();
    for(int i = 0; i < 3; ++i)
        PyTuple_SET_ITEM(retval, i, PyInt_FromLong(long(pickHighlightColor[i])));
    return retval;
}

/*static*/ PyObject *
PickAttributes_SetRemovedPicks(PyObject *self, PyObject *args)
{
    PickAttributesObject *obj = (PickAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged as first member of a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyUnicode_Check(packaged_args))
            args = packaged_args;
    }

    if (!PyUnicode_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a unicode string");
    }

    char const *val = PyUnicode_AsUTF8(args);
    std::string cval = std::string(val);

    if (val == 0 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as utf8 string");
    }

    Py_XDECREF(packaged_args);

    // Set the removedPicks in the object.
    obj->data->SetRemovedPicks(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
PickAttributes_GetRemovedPicks(PyObject *self, PyObject *args)
{
    PickAttributesObject *obj = (PickAttributesObject *)self;
    PyObject *retval = PyString_FromString(obj->data->GetRemovedPicks().c_str());
    return retval;
}

/*static*/ PyObject *
PickAttributes_SetSwivelFocusToPick(PyObject *self, PyObject *args)
{
    PickAttributesObject *obj = (PickAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    long val = PyLong_AsLong(args);
    bool cval = bool(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ bool");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(long(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ bool");
    }

    Py_XDECREF(packaged_args);

    // Set the swivelFocusToPick in the object.
    obj->data->SetSwivelFocusToPick(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
PickAttributes_GetSwivelFocusToPick(PyObject *self, PyObject *args)
{
    PickAttributesObject *obj = (PickAttributesObject *)self;
    PyObject *retval = PyInt_FromLong(obj->data->GetSwivelFocusToPick()?1L:0L);
    return retval;
}

/*static*/ PyObject *
PickAttributes_SetOverridePickLabel(PyObject *self, PyObject *args)
{
    PickAttributesObject *obj = (PickAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    long val = PyLong_AsLong(args);
    bool cval = bool(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ bool");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(long(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ bool");
    }

    Py_XDECREF(packaged_args);

    // Set the overridePickLabel in the object.
    obj->data->SetOverridePickLabel(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
PickAttributes_GetOverridePickLabel(PyObject *self, PyObject *args)
{
    PickAttributesObject *obj = (PickAttributesObject *)self;
    PyObject *retval = PyInt_FromLong(obj->data->GetOverridePickLabel()?1L:0L);
    return retval;
}

/*static*/ PyObject *
PickAttributes_SetForcedPickLabel(PyObject *self, PyObject *args)
{
    PickAttributesObject *obj = (PickAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged as first member of a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyUnicode_Check(packaged_args))
            args = packaged_args;
    }

    if (!PyUnicode_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a unicode string");
    }

    char const *val = PyUnicode_AsUTF8(args);
    std::string cval = std::string(val);

    if (val == 0 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as utf8 string");
    }

    Py_XDECREF(packaged_args);

    // Set the forcedPickLabel in the object.
    obj->data->SetForcedPickLabel(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
PickAttributes_GetForcedPickLabel(PyObject *self, PyObject *args)
{
    PickAttributesObject *obj = (PickAttributesObject *)self;
    PyObject *retval = PyString_FromString(obj->data->GetForcedPickLabel().c_str());
    return retval;
}

/*static*/ PyObject *
PickAttributes_SetRemoveLabelTwins(PyObject *self, PyObject *args)
{
    PickAttributesObject *obj = (PickAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    long val = PyLong_AsLong(args);
    bool cval = bool(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ bool");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(long(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ bool");
    }

    Py_XDECREF(packaged_args);

    // Set the removeLabelTwins in the object.
    obj->data->SetRemoveLabelTwins(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
PickAttributes_GetRemoveLabelTwins(PyObject *self, PyObject *args)
{
    PickAttributesObject *obj = (PickAttributesObject *)self;
    PyObject *retval = PyInt_FromLong(obj->data->GetRemoveLabelTwins()?1L:0L);
    return retval;
}



PyMethodDef PyPickAttributes_methods[PICKATTRIBUTES_NMETH] = {
    {"Notify", PickAttributes_Notify, METH_VARARGS},
    {"SetVariables", PickAttributes_SetVariables, METH_VARARGS},
    {"GetVariables", PickAttributes_GetVariables, METH_VARARGS},
    {"SetShowIncidentElements", PickAttributes_SetShowIncidentElements, METH_VARARGS},
    {"GetShowIncidentElements", PickAttributes_GetShowIncidentElements, METH_VARARGS},
    {"SetShowNodeId", PickAttributes_SetShowNodeId, METH_VARARGS},
    {"GetShowNodeId", PickAttributes_GetShowNodeId, METH_VARARGS},
    {"SetShowNodeDomainLogicalCoords", PickAttributes_SetShowNodeDomainLogicalCoords, METH_VARARGS},
    {"GetShowNodeDomainLogicalCoords", PickAttributes_GetShowNodeDomainLogicalCoords, METH_VARARGS},
    {"SetShowNodeBlockLogicalCoords", PickAttributes_SetShowNodeBlockLogicalCoords, METH_VARARGS},
    {"GetShowNodeBlockLogicalCoords", PickAttributes_GetShowNodeBlockLogicalCoords, METH_VARARGS},
    {"SetShowNodePhysicalCoords", PickAttributes_SetShowNodePhysicalCoords, METH_VARARGS},
    {"GetShowNodePhysicalCoords", PickAttributes_GetShowNodePhysicalCoords, METH_VARARGS},
    {"SetShowZoneId", PickAttributes_SetShowZoneId, METH_VARARGS},
    {"GetShowZoneId", PickAttributes_GetShowZoneId, METH_VARARGS},
    {"SetShowZoneDomainLogicalCoords", PickAttributes_SetShowZoneDomainLogicalCoords, METH_VARARGS},
    {"GetShowZoneDomainLogicalCoords", PickAttributes_GetShowZoneDomainLogicalCoords, METH_VARARGS},
    {"SetShowZoneBlockLogicalCoords", PickAttributes_SetShowZoneBlockLogicalCoords, METH_VARARGS},
    {"GetShowZoneBlockLogicalCoords", PickAttributes_GetShowZoneBlockLogicalCoords, METH_VARARGS},
    {"SetDoTimeCurve", PickAttributes_SetDoTimeCurve, METH_VARARGS},
    {"GetDoTimeCurve", PickAttributes_GetDoTimeCurve, METH_VARARGS},
    {"SetConciseOutput", PickAttributes_SetConciseOutput, METH_VARARGS},
    {"GetConciseOutput", PickAttributes_GetConciseOutput, METH_VARARGS},
    {"SetShowTimeStep", PickAttributes_SetShowTimeStep, METH_VARARGS},
    {"GetShowTimeStep", PickAttributes_GetShowTimeStep, METH_VARARGS},
    {"SetShowMeshName", PickAttributes_SetShowMeshName, METH_VARARGS},
    {"GetShowMeshName", PickAttributes_GetShowMeshName, METH_VARARGS},
    {"SetBlockPieceName", PickAttributes_SetBlockPieceName, METH_VARARGS},
    {"GetBlockPieceName", PickAttributes_GetBlockPieceName, METH_VARARGS},
    {"SetGroupPieceName", PickAttributes_SetGroupPieceName, METH_VARARGS},
    {"GetGroupPieceName", PickAttributes_GetGroupPieceName, METH_VARARGS},
    {"SetUseLabelAsPickLetter", PickAttributes_SetUseLabelAsPickLetter, METH_VARARGS},
    {"GetUseLabelAsPickLetter", PickAttributes_GetUseLabelAsPickLetter, METH_VARARGS},
    {"SetShowGlobalIds", PickAttributes_SetShowGlobalIds, METH_VARARGS},
    {"GetShowGlobalIds", PickAttributes_GetShowGlobalIds, METH_VARARGS},
    {"SetShowPickLetter", PickAttributes_SetShowPickLetter, METH_VARARGS},
    {"GetShowPickLetter", PickAttributes_GetShowPickLetter, METH_VARARGS},
    {"SetElementLabel", PickAttributes_SetElementLabel, METH_VARARGS},
    {"GetElementLabel", PickAttributes_GetElementLabel, METH_VARARGS},
    {"SetReusePickLetter", PickAttributes_SetReusePickLetter, METH_VARARGS},
    {"GetReusePickLetter", PickAttributes_GetReusePickLetter, METH_VARARGS},
    {"SetShowPickHighlight", PickAttributes_SetShowPickHighlight, METH_VARARGS},
    {"GetShowPickHighlight", PickAttributes_GetShowPickHighlight, METH_VARARGS},
    {"SetNotifyEnabled", PickAttributes_SetNotifyEnabled, METH_VARARGS},
    {"GetNotifyEnabled", PickAttributes_GetNotifyEnabled, METH_VARARGS},
    {"SetMeshCoordType", PickAttributes_SetMeshCoordType, METH_VARARGS},
    {"GetMeshCoordType", PickAttributes_GetMeshCoordType, METH_VARARGS},
    {"SetCreateSpreadsheet", PickAttributes_SetCreateSpreadsheet, METH_VARARGS},
    {"GetCreateSpreadsheet", PickAttributes_GetCreateSpreadsheet, METH_VARARGS},
    {"SetFloatFormat", PickAttributes_SetFloatFormat, METH_VARARGS},
    {"GetFloatFormat", PickAttributes_GetFloatFormat, METH_VARARGS},
    {"SetTimePreserveCoord", PickAttributes_SetTimePreserveCoord, METH_VARARGS},
    {"GetTimePreserveCoord", PickAttributes_GetTimePreserveCoord, METH_VARARGS},
    {"SetTimeCurveType", PickAttributes_SetTimeCurveType, METH_VARARGS},
    {"GetTimeCurveType", PickAttributes_GetTimeCurveType, METH_VARARGS},
    {"SetPickHighlightColor", PickAttributes_SetPickHighlightColor, METH_VARARGS},
    {"GetPickHighlightColor", PickAttributes_GetPickHighlightColor, METH_VARARGS},
    {"SetRemovedPicks", PickAttributes_SetRemovedPicks, METH_VARARGS},
    {"GetRemovedPicks", PickAttributes_GetRemovedPicks, METH_VARARGS},
    {"SetSwivelFocusToPick", PickAttributes_SetSwivelFocusToPick, METH_VARARGS},
    {"GetSwivelFocusToPick", PickAttributes_GetSwivelFocusToPick, METH_VARARGS},
    {"SetOverridePickLabel", PickAttributes_SetOverridePickLabel, METH_VARARGS},
    {"GetOverridePickLabel", PickAttributes_GetOverridePickLabel, METH_VARARGS},
    {"SetForcedPickLabel", PickAttributes_SetForcedPickLabel, METH_VARARGS},
    {"GetForcedPickLabel", PickAttributes_GetForcedPickLabel, METH_VARARGS},
    {"SetRemoveLabelTwins", PickAttributes_SetRemoveLabelTwins, METH_VARARGS},
    {"GetRemoveLabelTwins", PickAttributes_GetRemoveLabelTwins, METH_VARARGS},
    {NULL, NULL}
};

//
// Type functions
//

static void
PickAttributes_dealloc(PyObject *v)
{
   PickAttributesObject *obj = (PickAttributesObject *)v;
   if(obj->parent != 0)
       Py_DECREF(obj->parent);
   if(obj->owns)
       delete obj->data;
}

static PyObject *PickAttributes_richcompare(PyObject *self, PyObject *other, int op);
PyObject *
PyPickAttributes_getattr(PyObject *self, char *name)
{
    if(strcmp(name, "variables") == 0)
        return PickAttributes_GetVariables(self, NULL);
    if(strcmp(name, "showIncidentElements") == 0)
        return PickAttributes_GetShowIncidentElements(self, NULL);
    if(strcmp(name, "showNodeId") == 0)
        return PickAttributes_GetShowNodeId(self, NULL);
    if(strcmp(name, "showNodeDomainLogicalCoords") == 0)
        return PickAttributes_GetShowNodeDomainLogicalCoords(self, NULL);
    if(strcmp(name, "showNodeBlockLogicalCoords") == 0)
        return PickAttributes_GetShowNodeBlockLogicalCoords(self, NULL);
    if(strcmp(name, "showNodePhysicalCoords") == 0)
        return PickAttributes_GetShowNodePhysicalCoords(self, NULL);
    if(strcmp(name, "showZoneId") == 0)
        return PickAttributes_GetShowZoneId(self, NULL);
    if(strcmp(name, "showZoneDomainLogicalCoords") == 0)
        return PickAttributes_GetShowZoneDomainLogicalCoords(self, NULL);
    if(strcmp(name, "showZoneBlockLogicalCoords") == 0)
        return PickAttributes_GetShowZoneBlockLogicalCoords(self, NULL);
    if(strcmp(name, "doTimeCurve") == 0)
        return PickAttributes_GetDoTimeCurve(self, NULL);
    if(strcmp(name, "conciseOutput") == 0)
        return PickAttributes_GetConciseOutput(self, NULL);
    if(strcmp(name, "showTimeStep") == 0)
        return PickAttributes_GetShowTimeStep(self, NULL);
    if(strcmp(name, "showMeshName") == 0)
        return PickAttributes_GetShowMeshName(self, NULL);
    if(strcmp(name, "blockPieceName") == 0)
        return PickAttributes_GetBlockPieceName(self, NULL);
    if(strcmp(name, "groupPieceName") == 0)
        return PickAttributes_GetGroupPieceName(self, NULL);
    if(strcmp(name, "useLabelAsPickLetter") == 0)
        return PickAttributes_GetUseLabelAsPickLetter(self, NULL);
    if(strcmp(name, "showGlobalIds") == 0)
        return PickAttributes_GetShowGlobalIds(self, NULL);
    if(strcmp(name, "showPickLetter") == 0)
        return PickAttributes_GetShowPickLetter(self, NULL);
    if(strcmp(name, "elementLabel") == 0)
        return PickAttributes_GetElementLabel(self, NULL);
    if(strcmp(name, "reusePickLetter") == 0)
        return PickAttributes_GetReusePickLetter(self, NULL);
    if(strcmp(name, "showPickHighlight") == 0)
        return PickAttributes_GetShowPickHighlight(self, NULL);
    if(strcmp(name, "notifyEnabled") == 0)
        return PickAttributes_GetNotifyEnabled(self, NULL);
    if(strcmp(name, "meshCoordType") == 0)
        return PickAttributes_GetMeshCoordType(self, NULL);
    if(strcmp(name, "XY") == 0)
        return PyInt_FromLong(long(PickAttributes::XY));
    if(strcmp(name, "RZ") == 0)
        return PyInt_FromLong(long(PickAttributes::RZ));
    if(strcmp(name, "ZR") == 0)
        return PyInt_FromLong(long(PickAttributes::ZR));

    if(strcmp(name, "createSpreadsheet") == 0)
        return PickAttributes_GetCreateSpreadsheet(self, NULL);
    if(strcmp(name, "floatFormat") == 0)
        return PickAttributes_GetFloatFormat(self, NULL);
    if(strcmp(name, "timePreserveCoord") == 0)
        return PickAttributes_GetTimePreserveCoord(self, NULL);
    if(strcmp(name, "timeCurveType") == 0)
        return PickAttributes_GetTimeCurveType(self, NULL);
    if(strcmp(name, "Single_Y_Axis") == 0)
        return PyInt_FromLong(long(PickAttributes::Single_Y_Axis));
    if(strcmp(name, "Multiple_Y_Axes") == 0)
        return PyInt_FromLong(long(PickAttributes::Multiple_Y_Axes));

    if(strcmp(name, "pickHighlightColor") == 0)
        return PickAttributes_GetPickHighlightColor(self, NULL);
    if(strcmp(name, "removedPicks") == 0)
        return PickAttributes_GetRemovedPicks(self, NULL);
    if(strcmp(name, "swivelFocusToPick") == 0)
        return PickAttributes_GetSwivelFocusToPick(self, NULL);
    if(strcmp(name, "overridePickLabel") == 0)
        return PickAttributes_GetOverridePickLabel(self, NULL);
    if(strcmp(name, "forcedPickLabel") == 0)
        return PickAttributes_GetForcedPickLabel(self, NULL);
    if(strcmp(name, "removeLabelTwins") == 0)
        return PickAttributes_GetRemoveLabelTwins(self, NULL);


    // Add a __dict__ answer so that dir() works
    if (!strcmp(name, "__dict__"))
    {
        PyObject *result = PyDict_New();
        for (int i = 0; PyPickAttributes_methods[i].ml_meth; i++)
            PyDict_SetItem(result,
                PyString_FromString(PyPickAttributes_methods[i].ml_name),
                PyString_FromString(PyPickAttributes_methods[i].ml_name));
        return result;
    }

    return Py_FindMethod(PyPickAttributes_methods, self, name);
}

int
PyPickAttributes_setattr(PyObject *self, char *name, PyObject *args)
{
    PyObject NULL_PY_OBJ;
    PyObject *obj = &NULL_PY_OBJ;

    if(strcmp(name, "variables") == 0)
        obj = PickAttributes_SetVariables(self, args);
    else if(strcmp(name, "showIncidentElements") == 0)
        obj = PickAttributes_SetShowIncidentElements(self, args);
    else if(strcmp(name, "showNodeId") == 0)
        obj = PickAttributes_SetShowNodeId(self, args);
    else if(strcmp(name, "showNodeDomainLogicalCoords") == 0)
        obj = PickAttributes_SetShowNodeDomainLogicalCoords(self, args);
    else if(strcmp(name, "showNodeBlockLogicalCoords") == 0)
        obj = PickAttributes_SetShowNodeBlockLogicalCoords(self, args);
    else if(strcmp(name, "showNodePhysicalCoords") == 0)
        obj = PickAttributes_SetShowNodePhysicalCoords(self, args);
    else if(strcmp(name, "showZoneId") == 0)
        obj = PickAttributes_SetShowZoneId(self, args);
    else if(strcmp(name, "showZoneDomainLogicalCoords") == 0)
        obj = PickAttributes_SetShowZoneDomainLogicalCoords(self, args);
    else if(strcmp(name, "showZoneBlockLogicalCoords") == 0)
        obj = PickAttributes_SetShowZoneBlockLogicalCoords(self, args);
    else if(strcmp(name, "doTimeCurve") == 0)
        obj = PickAttributes_SetDoTimeCurve(self, args);
    else if(strcmp(name, "conciseOutput") == 0)
        obj = PickAttributes_SetConciseOutput(self, args);
    else if(strcmp(name, "showTimeStep") == 0)
        obj = PickAttributes_SetShowTimeStep(self, args);
    else if(strcmp(name, "showMeshName") == 0)
        obj = PickAttributes_SetShowMeshName(self, args);
    else if(strcmp(name, "blockPieceName") == 0)
        obj = PickAttributes_SetBlockPieceName(self, args);
    else if(strcmp(name, "groupPieceName") == 0)
        obj = PickAttributes_SetGroupPieceName(self, args);
    else if(strcmp(name, "useLabelAsPickLetter") == 0)
        obj = PickAttributes_SetUseLabelAsPickLetter(self, args);
    else if(strcmp(name, "showGlobalIds") == 0)
        obj = PickAttributes_SetShowGlobalIds(self, args);
    else if(strcmp(name, "showPickLetter") == 0)
        obj = PickAttributes_SetShowPickLetter(self, args);
    else if(strcmp(name, "elementLabel") == 0)
        obj = PickAttributes_SetElementLabel(self, args);
    else if(strcmp(name, "reusePickLetter") == 0)
        obj = PickAttributes_SetReusePickLetter(self, args);
    else if(strcmp(name, "showPickHighlight") == 0)
        obj = PickAttributes_SetShowPickHighlight(self, args);
    else if(strcmp(name, "notifyEnabled") == 0)
        obj = PickAttributes_SetNotifyEnabled(self, args);
    else if(strcmp(name, "meshCoordType") == 0)
        obj = PickAttributes_SetMeshCoordType(self, args);
    else if(strcmp(name, "createSpreadsheet") == 0)
        obj = PickAttributes_SetCreateSpreadsheet(self, args);
    else if(strcmp(name, "floatFormat") == 0)
        obj = PickAttributes_SetFloatFormat(self, args);
    else if(strcmp(name, "timePreserveCoord") == 0)
        obj = PickAttributes_SetTimePreserveCoord(self, args);
    else if(strcmp(name, "timeCurveType") == 0)
        obj = PickAttributes_SetTimeCurveType(self, args);
    else if(strcmp(name, "pickHighlightColor") == 0)
        obj = PickAttributes_SetPickHighlightColor(self, args);
    else if(strcmp(name, "removedPicks") == 0)
        obj = PickAttributes_SetRemovedPicks(self, args);
    else if(strcmp(name, "swivelFocusToPick") == 0)
        obj = PickAttributes_SetSwivelFocusToPick(self, args);
    else if(strcmp(name, "overridePickLabel") == 0)
        obj = PickAttributes_SetOverridePickLabel(self, args);
    else if(strcmp(name, "forcedPickLabel") == 0)
        obj = PickAttributes_SetForcedPickLabel(self, args);
    else if(strcmp(name, "removeLabelTwins") == 0)
        obj = PickAttributes_SetRemoveLabelTwins(self, args);

    if (obj != NULL && obj != &NULL_PY_OBJ)
        Py_DECREF(obj);

    if (obj == &NULL_PY_OBJ)
    {
        obj = NULL;
        PyErr_Format(PyExc_NameError, "name '%s' is not defined", name);
    }
    else if (obj == NULL && !PyErr_Occurred())
        PyErr_Format(PyExc_RuntimeError, "unknown problem with '%s'", name);

    return (obj != NULL) ? 0 : -1;
}

static int
PickAttributes_print(PyObject *v, FILE *fp, int flags)
{
    PickAttributesObject *obj = (PickAttributesObject *)v;
    fprintf(fp, "%s", PyPickAttributes_ToString(obj->data, "",false).c_str());
    return 0;
}

PyObject *
PickAttributes_str(PyObject *v)
{
    PickAttributesObject *obj = (PickAttributesObject *)v;
    return PyString_FromString(PyPickAttributes_ToString(obj->data,"", false).c_str());
}

//
// The doc string for the class.
//
#if PY_MAJOR_VERSION > 2 || (PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION >= 5)
static const char *PickAttributes_Purpose = "This class contains attributes used for pick.";
#else
static char *PickAttributes_Purpose = "This class contains attributes used for pick.";
#endif

//
// Python Type Struct Def Macro from Py2and3Support.h
//
//         VISIT_PY_TYPE_OBJ( VPY_TYPE,
//                            VPY_NAME,
//                            VPY_OBJECT,
//                            VPY_DEALLOC,
//                            VPY_PRINT,
//                            VPY_GETATTR,
//                            VPY_SETATTR,
//                            VPY_STR,
//                            VPY_PURPOSE,
//                            VPY_RICHCOMP,
//                            VPY_AS_NUMBER)

//
// The type description structure
//

VISIT_PY_TYPE_OBJ(PickAttributesType,         \
                  "PickAttributes",           \
                  PickAttributesObject,       \
                  PickAttributes_dealloc,     \
                  PickAttributes_print,       \
                  PyPickAttributes_getattr,   \
                  PyPickAttributes_setattr,   \
                  PickAttributes_str,         \
                  PickAttributes_Purpose,     \
                  PickAttributes_richcompare, \
                  0); /* as_number*/

//
// Helper function for comparing.
//
static PyObject *
PickAttributes_richcompare(PyObject *self, PyObject *other, int op)
{
    // only compare against the same type 
    if ( Py_TYPE(self) != &PickAttributesType
         || Py_TYPE(other) != &PickAttributesType)
    {
        Py_INCREF(Py_NotImplemented);
        return Py_NotImplemented;
    }

    PyObject *res = NULL;
    PickAttributes *a = ((PickAttributesObject *)self)->data;
    PickAttributes *b = ((PickAttributesObject *)other)->data;

    switch (op)
    {
       case Py_EQ:
           res = (*a == *b) ? Py_True : Py_False;
           break;
       case Py_NE:
           res = (*a != *b) ? Py_True : Py_False;
           break;
       default:
           res = Py_NotImplemented;
           break;
    }

    Py_INCREF(res);
    return res;
}

//
// Helper functions for object allocation.
//

static PickAttributes *defaultAtts = 0;
static PickAttributes *currentAtts = 0;

static PyObject *
NewPickAttributes(int useCurrent)
{
    PickAttributesObject *newObject;
    newObject = PyObject_NEW(PickAttributesObject, &PickAttributesType);
    if(newObject == NULL)
        return NULL;
    if(useCurrent && currentAtts != 0)
        newObject->data = new PickAttributes(*currentAtts);
    else if(defaultAtts != 0)
        newObject->data = new PickAttributes(*defaultAtts);
    else
        newObject->data = new PickAttributes;
    newObject->owns = true;
    newObject->parent = 0;
    return (PyObject *)newObject;
}

static PyObject *
WrapPickAttributes(const PickAttributes *attr)
{
    PickAttributesObject *newObject;
    newObject = PyObject_NEW(PickAttributesObject, &PickAttributesType);
    if(newObject == NULL)
        return NULL;
    newObject->data = (PickAttributes *)attr;
    newObject->owns = false;
    newObject->parent = 0;
    return (PyObject *)newObject;
}

///////////////////////////////////////////////////////////////////////////////
//
// Interface that is exposed to the VisIt module.
//
///////////////////////////////////////////////////////////////////////////////

PyObject *
PickAttributes_new(PyObject *self, PyObject *args)
{
    int useCurrent = 0;
    if (!PyArg_ParseTuple(args, "i", &useCurrent))
    {
        if (!PyArg_ParseTuple(args, ""))
            return NULL;
        else
            PyErr_Clear();
    }

    return (PyObject *)NewPickAttributes(useCurrent);
}

//
// Plugin method table. These methods are added to the visitmodule's methods.
//
static PyMethodDef PickAttributesMethods[] = {
    {"PickAttributes", PickAttributes_new, METH_VARARGS},
    {NULL,      NULL}        /* Sentinel */
};

static Observer *PickAttributesObserver = 0;

std::string
PyPickAttributes_GetLogString()
{
    std::string s("PickAtts = GetPickAttributes()\n");
    if(currentAtts != 0)
        s += PyPickAttributes_ToString(currentAtts, "PickAtts.");
    return s;
}

static void
PyPickAttributes_CallLogRoutine(Subject *subj, void *data)
{
    typedef void (*logCallback)(const std::string &);
    logCallback cb = (logCallback)data;

    if(cb != 0)
    {
        std::string s("PickAtts = GetPickAttributes()\n");
        s += PyPickAttributes_ToString(currentAtts, "PickAtts.");
        cb(s);
    }
}

void
PyPickAttributes_StartUp(PickAttributes *subj, void *data)
{
    if(subj == 0)
        return;

    currentAtts = subj;
    PyPickAttributes_SetDefaults(subj);

    //
    // Create the observer that will be notified when the attributes change.
    //
    if(PickAttributesObserver == 0)
    {
        PickAttributesObserver = new ObserverToCallback(subj,
            PyPickAttributes_CallLogRoutine, (void *)data);
    }

}

void
PyPickAttributes_CloseDown()
{
    delete defaultAtts;
    defaultAtts = 0;
    delete PickAttributesObserver;
    PickAttributesObserver = 0;
}

PyMethodDef *
PyPickAttributes_GetMethodTable(int *nMethods)
{
    *nMethods = 1;
    return PickAttributesMethods;
}

bool
PyPickAttributes_Check(PyObject *obj)
{
    return (obj->ob_type == &PickAttributesType);
}

PickAttributes *
PyPickAttributes_FromPyObject(PyObject *obj)
{
    PickAttributesObject *obj2 = (PickAttributesObject *)obj;
    return obj2->data;
}

PyObject *
PyPickAttributes_New()
{
    return NewPickAttributes(0);
}

PyObject *
PyPickAttributes_Wrap(const PickAttributes *attr)
{
    return WrapPickAttributes(attr);
}

void
PyPickAttributes_SetParent(PyObject *obj, PyObject *parent)
{
    PickAttributesObject *obj2 = (PickAttributesObject *)obj;
    obj2->parent = parent;
}

void
PyPickAttributes_SetDefaults(const PickAttributes *atts)
{
    if(defaultAtts)
        delete defaultAtts;

    defaultAtts = new PickAttributes(*atts);
}

